package com.parktech.sun.domain.model.notice;

import com.parktech.sun.domain.model.BaseEntity;
import com.parktech.sun.domain.model.ContentEntity;

import javax.persistence.*;
import java.util.List;

/**
 * User: Think
 * Date: 11-1-12
 * Time: 下午7:01
 */
@Entity
@DiscriminatorValue("60")
public class Notice extends ContentEntity {

    private List<NoticeAttachment> attachmentList;

    @OneToMany(fetch= FetchType.LAZY, mappedBy = "notice", cascade = CascadeType.ALL)
    public List<NoticeAttachment> getAttachmentList() {
        return attachmentList;
    }

    public void setAttachmentList(List<NoticeAttachment> attachmentList) {
        this.attachmentList = attachmentList;
    }

    @Transient
    public String getLocation() {
        return "notices";
    }
}
